// 定义与Java中BaseResponse<T>对应的前端数据结构
export interface BaseResponse {
  code: string
  message: string
}

// 单个用户对象的ts类型
export interface Video {
  id: number
  timeLength?: string
  url: string
  cover?: string
  name: string
  description?: string
  userName?: string
  commentCount?: number
  playCount?: number
  likeCount?: number
  danmakuCount?: number
  collectCount?: number
  createTime: string
}

export interface VideoAddRequest {
  timeLength?: string
  url: string
  cover?: string
  name: string
  description?: string
  userId: number
}

export interface VideoQueryRequest {
  videName?: string
  userName?: string
}

export interface VideoUpdateRequest {
  id: number
  timeLength?: string
  url: string
  cover?: string
  name: string
  description?: string
  userId: number
}
export interface PageVideo extends BaseResponse {
  data: {
    current?: number
    pages?: number
    records?: Array<Video>
    size?: number
    total?: number
  }
}

export interface DeleteRequest {
  id: number
}
